//
//  UIView+Inspectable.swift
//  SinaWeiBo
//
//  Created by King.Kong. on 16/5/22.
//  Copyright © 2016年 King.Kong. All rights reserved.
//

import UIKit


extension UIView {
    
    // 增加可视化属性
    @IBInspectable var cornerRadius: CGFloat {
        
        get {
            
            return layer.cornerRadius
        }
        
        set {
            
            layer.cornerRadius = newValue
        }
    }
    
    @IBInspectable var borderWidth: CGFloat {
        
        get {
            
            return layer.borderWidth
        }
        
        set {
            
            layer.borderWidth = newValue
        }
    }

    @IBInspectable var borderColor: UIColor {
        
        get {
            
            return UIColor(CGColor: layer.borderColor!)
        }
        
        set {
            
            layer.borderColor = newValue.CGColor
        }
    }


    
}